package com.aqiang.day0528_shop.main.contract

import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.SearchGoodsEntity
import com.aqiang.lib_core.mvp.BasePresenter
import com.aqiang.lib_core.mvp.IModel
import com.aqiang.lib_core.mvp.IView
import kotlinx.coroutines.Deferred

interface SearchGoodsContract {
    interface SearchGoodsView :IView{
        fun getKeyWork():String
        fun getType():Int
        fun initAdapter(goods:Deferred<BaseEntity<List<SearchGoodsEntity>>>)
    }

    interface SearchGoodsModel : IModel{
        fun searchGoods(keyWork:String,id:Int):Deferred<BaseEntity<List<SearchGoodsEntity>>>
    }

    abstract class SearchGoodsPresenter(v:SearchGoodsView) : BasePresenter<SearchGoodsModel,SearchGoodsView>(v){
        abstract fun searchGoods()
    }
}